﻿<%@page import="org.springframework.ui.Model"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
			
%>
<!doctype html>
<html>
<head>
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<meta charset="utf-8">
<title>注册页</title>
</head>
<link href="<%=path%>/statics/resource/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<%=path%>/statics/resource/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/statics/resource/js/jquery.validate.js"></script>
<script type="text/javascript" src="<%=path%>/statics/resource/js/interaction.js"></script>
<link rel="stylesheet" href="<%=path %>/statics/css/sysz.css">
<body style="background-color:#f4f4f4;">
  <% int max=9999;
        int min=1000;
        Random random = new Random();

        int s = random.nextInt(max)%(max-min+1) + min;
  String phone = (String)request.getAttribute("ph"); 
   String pwd = (String)request.getAttribute("pwd"); 
   
   request.setAttribute("phone", request.getAttribute("ph"));
      request.setAttribute("pwd",request.getAttribute("pwd"));
            String PostData = "account=1291344851&password=zhp20010924&mobile="+phone+"&content="+java.net.URLEncoder.encode("您的订单编码："+s+"。如需帮助请联系客服。","utf-8");
            //out.println(PostData);
            String ret = com.dxton.www.Send.SMS(PostData, "http://sms.106jiekou.com/utf8/sms.aspx");
           out.print(ret+s);
          
        %>
        <script type="text/javascript" src="<%=path %>/statics/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="<%=path %>/statics/js/alertPopShow.js"></script>

    <div class="headBar">
        <a href="javascript:history.back(-1)"><img class="headleft" src="<%=path%>/statics/resource/images/backjt.png"></a>
        <span>手机注册</span>
    </div>
    <script type="text/javascript">
    
    
    function oncli(opr){
    var yan = document.getElementById("registercaptcha").value;
       
    if(yan==opr){
    
    document.getElementById("registerForm2").submit();
    }else{
     webToast("验证码错误","middle",1000);
    }
    }
    
    </script>
    <div class="mth1"></div>
    <div class="register"> 
    <form id="registerForm2" name="registerForm2" method="post" action="<%=path %>/user/wanc.html">
  <input type="password" id="registerkeyword" hidden="hidden" value="${pwd }" name="registerkeyword" style="width:80%;">
  <input type="tel" id="registermobile" hidden="hidden" value="${phone }" name="registermobile" style="width:80%;" maxlength="11" value="输入手机号码" />
    <div class="mid mt10" style="width:80%;">
      <span class="register2label">您的手机号：+86 ${phone }</span>
      <br/><label class="tip">请输入您收到的短信验证码</label>
    </div>
    <div class="mid mt15" style="width:80%;">
      <span><img id="registericon2" class="registerinputiconleft" src="<%=path%>/statics/resource/images/codeicon.png"></span>
      <input type="text" id="registercaptcha" name="registercaptcha" style="width:85%;">
      <br/><input type="button" id="btn" value="免费获取验证码" onclick="settime(this)" /> 
<script type="text/javascript"> 
var bs = document.getElementById("btn");
settime(bs); 
var countdown=59; 
function settime(val) { 

if (countdown == 0) { 
val.removeAttribute("disabled");    
val.value="免费获取验证码"; 
countdown = 60; 
return;
} else { 
if(countdown==undefined){
val.setAttribute("disabled", true); 
val.value="重新发送(" + 60 + ")"; 

}else{
val.setAttribute("disabled", true); 
val.value="重新发送(" + countdown + ")"; 
countdown--;
}
 
} 
setTimeout(function() { 
settime(val) 
},1000) 
} 
</script> 
    </div>
    <div class="mid mt10" style="width:80%;">
      <input type="button" onclick="oncli(<%=s %>)" style="color:#fff;font-size:16px; background:#2d94fb;border:none;border-radius:2px; width:100%;" value="下一步" />
    </div>
    </form>
    </div>
</body>
</html>

